@extends('layout.master')

@section('title','签到设置')

@section('css')
    @parent
    <link href="{{ asset('plugins/bower_components/summernote/dist/summernote.css') }}" rel="stylesheet"/>
    <!-- animation CSS -->
    <link href="{{ asset('css/animate.css') }}" rel="stylesheet">
    <link href="{{ asset('plugins/bower_components/icheck/skins/all.css') }}" rel="stylesheet">
	<link href="{{ asset('plugins/bower_components/bootstrap-daterangepicker/daterangepicker.css') }}" rel="stylesheet">
    <link href="{{ asset('plugins/bower_components/bootstrap-switch/bootstrap-switch.min.css') }}" rel="stylesheet">
	<link href="{{ asset('plugins/bower_components/bootstrap-daterangepicker/style.css') }}" rel="stylesheet">
@endsection
@section('main')
    @if (session('message'))
        <div>
            <input type="hidden" id="hidden" name="hidden" value="hidden">
            <input type="hidden" id="message" name="message" value="{{ session('message') }}">
            <input type="hidden" id="status" name="status" value="{{ session('status') }}">
        </div>
    @endif
    <div class="white-box">
        <form class="form-horizontal form-material" method="post" id='formid' enctype="multipart/form-data">
            <div class="row">
                <div class="col-md-6 col-sm-4">
                    <div class="form-group">
                        <label class="col-md-12">第一天</label>
                        <div class="col-md-12">
                            <input type="text" name="gold_1" id="gold_1" value="{{$config->gold_1}}"
                                   class="form-control form-control-line" required>
                        </div>
                    </div>
                </div>
                <div class="col-md-6 col-sm-4">
                    <div class="form-group">
                        <label class="col-md-12">第二天</label>
                        <div class="col-md-12">
                            <input type="text" name="gold_2" id="gold_2" value="{{$config->gold_2}}"
                                   class="form-control form-control-line" required>
                        </div>
                    </div>
                </div>
                <div class="col-md-6 col-sm-4">
                    <div class="form-group">
                        <label class="col-md-12">第三天</label>
                        <div class="col-md-12">
                            <input type="text" name="gold_3" id="gold_3" value="{{$config->gold_3}}"
                                   class="form-control form-control-line" required>
                        </div>
                    </div>
                </div>
                <div class="col-md-6 col-sm-4">
                    <div class="form-group">
                        <label class="col-md-12">第四天</label>
                        <div class="col-md-12">
                            <input type="text" name="gold_4" id="gold_4" value="{{$config->gold_4}}"
                                   class="form-control form-control-line" required>
                        </div>
                    </div>
                </div>
                <div class="col-md-6 col-sm-4">
                    <div class="form-group">
                        <label class="col-md-12">第五天</label>
                        <div class="col-md-12">
                            <input type="text" name="gold_5" id="gold_5" value="{{$config->gold_5}}"
                                   class="form-control form-control-line" required>
                        </div>
                    </div>
                </div>
                <div class="col-md-6 col-sm-4">
                    <div class="form-group">
                        <label class="col-md-12">第六天</label>
                        <div class="col-md-12">
                            <input type="text" name="gold_6" id="gold_6" value="{{$config->gold_6}}"
                                   class="form-control form-control-line" required>
                        </div>
                    </div>
                </div>
                <div class="col-md-6 col-sm-4">
                    <div class="form-group">
                        <label class="col-md-12">第七天起始</label>
                        <div class="col-md-12">
                            <input type="text" name="gold_min" id="gold_min" value="{{$config->gold_min}}"
                                   class="form-control form-control-line" required>
                        </div>
                    </div>
                </div>
                <div class="col-md-6 col-sm-4">
                    <div class="form-group">
                        <label class="col-md-12">第七天结束</label>
                        <div class="col-md-12">
                            <input type="text" name="gold_max" id="gold_max" value="{{$config->gold_max}}"
                                   class="form-control form-control-line" required>
                        </div>
                    </div>
                </div>
			</div>	
	
        <div class="form-group" style="margin-top: 100px;">
            <button class="fcbtn btn btn-success btn-outline btn-1e waves-effect">修改
            </button>
            {!! csrf_field() !!}
        </div>
	</form>
    </div>

@endsection
@section('js')
    @parent
	 <script src="{{ asset('plugins/bower_components/moment/moment.js') }}"></script>
	<script src="{{ asset('plugins/bower_components/bootstrap-daterangepicker/daterangepicker.js') }}"></script>
	<script src="{{ asset('plugins/bower_components/bootstrap-daterangepicker/timePacker.js') }}"></script>

    <script>
        $(document).ready(function () {
            var hidden = $('#hidden').val();
            if (hidden === 'hidden') {
                if ($('#status').val() == 1) {
                    toastsuccess($('#message').val());
                } else {
                    toasterror($('#message').val());
                }
            }
        });
    </script>
@endsection